<?php

include("config.php");

session_start();
$event_id = $_POST['event_id'];
$sql="SELECT username FROM user_event where event_ID=$event_id";
$result=mysql_query($sql);

$rows = array();
while($r = mysql_fetch_assoc($result)) {
  $rows[] = $r;
}

echo json_encode($rows);

?>

